package com.rc.evcharger.config;

import com.rc.evcharger.netty.listener.NettyListener;
import com.rc.evcharger.protocol.ylevcharger.netty.listener.YlNettyListener;
import org.springframework.boot.web.servlet.ServletContextInitializer;
import org.springframework.context.annotation.Configuration;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;

/**
 * Spring Boot 配置web.xml的listener
 * Created by sven on 2019/10/30
 */
@Configuration
public class WebApplicationInitializer implements ServletContextInitializer {
    @Override
    public void onStartup(ServletContext servletContext) throws ServletException {
//        servletContext.addListener(new NettyListener());
        servletContext.addListener(new YlNettyListener());
    }
}
